import { createRouter, createWebHistory } from "vue-router"
/**
 * 页面路由
 */
const routes = [
    {
        name: 'index',
        alias: '/home',
        path: "/",
        component: import("@/views/index/index.vue"),
        meta: {
            title: "首页"
        }
    },
    {
        name: 'control',
        alias: '/ctrl',
        path: "/control",
        component: import(/** webpack */ "@/views/control/index.vue"),
        meta: {
            title: "控制中心"
        }
    },
    {
        name: 'about',
        alias: '/guanyu',
        path: "/about",
        component: import(/** webpack */ "@/views/about/index.vue"),
        meta: {
            title: "关于我"
        },
        children: [{
            path: "/set",
            component: import(/** webpack */ "@/views/about/set/index.vue"),
            meta: {
                title: "设置"
            },
        }]
    }
];
const router = createRouter({
    history: createWebHistory(""),
    routes
});

export { router, routes };